package com.example.music.service;

import com.example.music.mapper.LoveMusicMapper;
import com.example.music.model.Music;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LoveMusicService {
    @Resource
    LoveMusicMapper loveMusicMapper;
   public Music findLoveMusicByMusicIdAndUserId(int userId,int musicId){
        return loveMusicMapper.findLoveMusicByMusicIdAndUserId(userId,musicId);
    }
    public Boolean insertLoveMusic(int userId,int musicId){
       return loveMusicMapper.insertLoveMusic(userId,musicId);
    }
    public List<Music> findLoveMusicBykeyAndUID(String musicName,int userid){
        return loveMusicMapper.findLoveMusicBykeyAndUID(musicName,userid);
    }
    public List<Music> findLoveMusicByUserId(int userid){
        return loveMusicMapper.findLoveMusicByUserId(userid);
    }
   public Boolean deleteLoveMusic(int musicId,int userId){
       return loveMusicMapper.deleteLoveMusic(musicId,userId);
    }
    public Boolean deleteLoveMusicById(int musicId){
        return loveMusicMapper.deleteLoveMusicById(musicId);
    }
}
